import request from '../utils/http';
const service  = import.meta.env.VITE_APP_BASE_URL

/**
 * 设备维修
 */

const maintenance = service + '/maintenance/deviceMaintenanceOrder/'

// 查询所有维修工单量统计
export function getMaintenanceAllOrderVolumeStatistics(data: any) {
    return request({
        url: maintenance + 'getAllOrderVolumeStatistics',
        method: 'post',
        data
    })
}
// 查询维修工单订单状态统计
export function getMaintenanceOrderStatusStatistics(data: any) {
    return request({
        url: maintenance + 'getOrderStatusStatistics',
        method: 'post',
        data
    })
}
// 查询维修单新增数量统计
export function getMaintenanceOrderGrowthStatistics(data: any) {
    return request({
        url: maintenance + 'getOrderGrowthStatistics',
        method: 'post',
        data
    })
}
/**
 * 设备保养
 */
const maintain = service + '/manage/device/maintain/order/'

// 查询所有维修工单量统计
export function getMaintainAllOrderVolumeStatistics(data: any) {
    return request({
        url: maintain + 'getAllOrderVolumeStatistics',
        method: 'post',
        data
    })
}
// 查询维修工单订单状态统计
export function getMaintainOrderStatusStatistics(data: any) {
    return request({
        url: maintain + 'getOrderStatusStatistics',
        method: 'post',
        data
    })
}
// 查询维修单新增数量统计
export function getMaintainOrderGrowthStatistics(data: any) {
    return request({
        url: maintain + 'getOrderGrowthStatistics',
        method: 'post',
        data
    })
}
/**
 * 设备保养
 */
const task = service + '/manage/device/inspection/task/'

// 查询所有维修工单量统计
export function getAbnormalStatistics(data: any) {
    return request({
        url: task + 'getAbnormalStatistics',
        method: 'post',
        data
    })
}
